#define _CRT_SECURE_NO_WARNINGS 1
#include"priority_queue.h"
#include<queue>

class myless
{
public:
	bool operator()(const int& a1,const int& a2)
	{
		return a1 < a2;
	}
};

class mygreater
{
public:
	bool operator()(const int& a1, const int& a2)
	{
		return a1 > a2;
	}
};

int main()
{
	int ia[9] = { 0,1,2,3,4,8,9,3,5 };
	mypriority_queue::priority_queue<int,myvector::vector<int>,myless> pq;
	pq.push(0);
	pq.push(1);
	pq.push(2);
	pq.push(3);
	pq.push(4);
	pq.push(8);
	pq.push(9);
	pq.push(3);
	pq.push(5);
	pq.push(0);
	pq.push(15);
	pq.push(2);
	pq.push(36);
	pq.push(4);
	pq.push(87);
	pq.push(9);
	pq.push(38);
	pq.push(5);
	pq.push(0);
	pq.push(1);
	pq.push(15);
	pq.push(-41);
	pq.push(41);
	pq.push(81);
	pq.push(92);
	pq.push(36);
	pq.push(57);
	cout << pq.size() << endl;
	for (size_t i = 0; i < pq.size(); ++i)
		cout << pq.top() << ' ';
	cout << endl;
	while (!pq.empty())
	{
		cout << pq.top() << ' ';
		pq.pop();
	}
	cout << endl;
	return 0;
}